package com.lgj.gateway.context;

import com.lgj.gateway.route.GateWayDynamicRoute;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author guangjie.liao
 * @Date: 2022/10/25 19:42
 * @Description:
 */
@Component
public class GateWayApplicationRunner implements ApplicationRunner {

    @Resource
    private GateWayDynamicRoute gateWayDynamicRoute;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        gateWayDynamicRoute.loadRoute();
    }
}
